[% setvar title Method calls SHOULD suffer from ambiguity by default %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='TITLE'></a><h1>TITLE</h1>
<p>Method calls SHOULD suffer from ambiguity by default</p>
<a name='VERSION'></a><h1>VERSION</h1>
<pre>  Maintainer: Nathan Wiger &lt;<a href='mailto:nate@wiger.org'>nate@wiger.org</a>&gt;
  Date: 24 Sep 2000
  Last Modified: 30 Sep 2000
  Mailing List: <a href='mailto:perl6-language@perl.org'>perl6-language@perl.org</a>
  Number: 277
  Version: 3
  Status: Frozen</pre>
<a name='ABSTRACT'></a><h1>ABSTRACT</h1>
<p>RFC 244 proposes special-casing -&gt; to quote the left operand, and
eliminating the bareword indirect object syntax entirely.</p>
<p>These are both bad ideas, in the author's opinion, and will likely cause
a large number of longtime Perl hackers to run away screaming.</p>
<p>Many people, myself included, view the ability to type:</p>
<pre>   $q = new CGI;
   $val = shift-&gt;{fullname};</pre>
<p>And have Perl DWIM is what makes Perl Perl, and fun. Forcing me to
write:</p>
<pre>   $q = new {'CGI'};
   $val = shift()-&gt;{fullname};</pre>
<p>Because this ambiguity upsets a few people is just plain silly. And
very un-fun.</p>
<p>Tightening this syntax by default makes no sense. Rather, this is
something that can easily be added to <code>use strict</code>. See <b>RFC 278</b> for
details on <code>use strict 'words'</code> and <code>use strict 'objects'</code>.</p>
<a name='DESCRIPTION'></a><h1>DESCRIPTION</h1>
<p>In Perl 5, there are already plenty of ways in which people can
<b>voluntarily</b> disambiguate the above:</p>
<pre>   $q = new 'CGI';               # main::new('CGI');
   $q = CGI::-&gt;new;              # or 'CGI'-&gt;new;

   $val = shift::-&gt;{fullname};   # or 'shift'-&gt;{fullname}
   $val = shift()-&gt;{fullname};   # main::shift()-&gt;{fullname}</pre>
<p>And if people want this to be enforced, then they can easily <code>use
strict 'words'</code> as specified in RFC 278. Or, those who despise indirect
objects may be able to say <code>no syntax 'indirect-objects'</code> using a
mechanism like that in RFC 329.</p>
<p>Perl 6 should be a value add to Perl 5. It should not take away
established, widely-used syntax just because of a little ambiguity. This
is hardly the only syntactic ambiguity in Perl.</p>
<a name='IMPLEMENTATION'></a><h1>IMPLEMENTATION</h1>
<p>Perl 6 should tokenize the above just like Perl 5.</p>
<a name='MIGRATION'></a><h1>MIGRATION</h1>
<p>None. Why would we want there to be?</p>
<a name='REFERENCES'></a><h1>REFERENCES</h1>
<p>RFC 28:  Perl should stay Perl.</p>
<p>RFC 278: Additions to 'use strict' to fix syntactic ambiguities</p>
<p>RFC 244: Method calls should not suffer from the action on a distance</p>
<p>RFC 329: <code>use syntax</code></p>
</div>
